<template>
  <div class="bar" ref="bar"></div>
</template>


<script>
import * as echarts from "echarts";
export default {
  name: "BarEchart.vue",
  components: {},
  data() {
    return {};
  },
  mounted() {
    let mychart = echarts.init(this.$refs.bar);
    mychart.setOption({
      xAxis: {
        type: "category",
        show: false,
        data: [
          "星期一",
          "星期二",
          "星期三",
          "星期四",
          "星期五",
          "星期六",
          "星期日",
        ],
      },
      yAxis: {
        show: false,
      },
      series: [
        {
          type: "bar",
          data: [10, 15, 33, 12, 48, 9, 29, 10],
          color: "cyan",
        },
      ],
      tooltip: {},
    });
  },
};
</script>


<style scoped>
.bar {
  width: 100%;
  height: 100%;
}
</style>